﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Text;

namespace ComicsEditor
{
    public class FontInfo
    {
        public string Name;
        public string FileName;
        public string Key;
        public string URL;

        public FontInfo(string Name)
        {
            this.Name = Name;
        }

        public static PrivateFontCollection EmbeddedFonts = new PrivateFontCollection();

        public static FontFamily Comic;
        public static FontFamily Serif = FontFamily.GenericSerif;
        public static FontFamily SansSerif = FontFamily.GenericSansSerif;
        public static FontFamily Monospace = FontFamily.GenericMonospace;

        public static readonly FontFamily FontResourceComic;

        static FontInfo()
        {
            PrivateFontCollection privateFonts = new PrivateFontCollection();
            byte[] fontData = global::ComicsEditor.Properties.Resources.animeace2_reg;
            unsafe
            {
                fixed (byte* pFontData = fontData)
                    privateFonts.AddMemoryFont((IntPtr)pFontData, fontData.Length);
            }
            FontResourceComic = privateFonts.Families[0];
            Comic = FontResourceComic;
        }
    }
}
